]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspacesView: Fix updating when number of workspaces changes
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 19 Oct 2012 17:58:05 +0000 (19:58 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 23 Oct 2012 16:27:07 +0000 (18:27 +0200)
Ouch. This went unnoticed for a long time as by default (using
dynamic workspaces) only one workspace is added at a time, which
happens to work fine.

https://bugzilla.gnome.org/show_bug.cgi?id=686487

js/ui/workspacesView.js

index c5c1e672e660660e70239c593fd35ee60d0459ea..c9e83a9c8ce5c36ffe7e0739329ce08abc4a65bf 100644 (file)
@@ -935,9 +935,10 @@ const WorkspacesDisplay = new Lang.Class({
                 // Assume workspaces are only added at the end
                 for (let w = oldNumWorkspaces; w < newNumWorkspaces; w++) {
                     let metaWorkspace = global.screen.get_workspace_by_index(w);
-                    this._workspaces[m++][w] =
+                    this._workspaces[m][w] =
                         new Workspace.Workspace(metaWorkspace, i);
                 }
+                m++;
             }
 
             this._thumbnailsBox.addThumbnails(oldNumWorkspaces, newNumWorkspaces - oldNumWorkspaces);